package com.novel.controller;

import com.alipay.api.domain.LogisticsCompanyIstd;
import com.novel.service.AuthorService;
import com.reading.pojo.Author;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("author")
public class AuthorController {

    @Autowired
    private AuthorService authorService;

    @RequestMapping("/findHotAuthor")
    public List<Map<String,String>> findHotAuthor(){
        return authorService.findHotAuthor();
    }

    @RequestMapping("/findAll")
    public List<Author> findAll(){
        return authorService.findAll();
    }
}
